package ws;

import javax.jws.WebService;
import javax.xml.ws.Endpoint;
/**
 * Created by IntelliJ IDEA.
 * User: cy
 * Date: 11/04/12
 * Time: 3:37 PM
 * To change this template use File | Settings | File Templates.
 */
@WebService
public class Java6WebService {
    public String doSomething() {
        return "hello webservice";
    }

    public static void main(String args[]) {
        Endpoint.publish("http://192.168.0.3:8080/java6ws/Java6WebService", new Java6WebService());
        //get wsdl by http://192.168.0.3:8080/java6ws/Java6WebService?wsdl

        /** import the webservice

         C:\Agui\archetype\quickstart\src\main\java>wsimport -p ws.client -keep http://19
         2.168.0.3:8080/java6ws/Java6WebService?wsdl
         parsing WSDL...


         generating code...


         compiling code...


         C:\Agui\archetype\quickstart\src\main\java>



         C:\Agui\archetype\quickstart\src\main\java\ws\client>dir
         驱动器 C 中的卷是 Windows7_OS
         卷的序列号是 C699-7C35

         C:\Agui\archetype\quickstart\src\main\java\ws\client 的目录

         11/04/2012  04:39 PM    <DIR>          .
         11/04/2012  04:39 PM    <DIR>          ..
         11/04/2012  04:39 PM               427 DoSomething.class
         11/04/2012  04:38 PM               737 DoSomething.java
         11/04/2012  04:39 PM               749 DoSomethingResponse.class
         11/04/2012  04:38 PM             1,493 DoSomethingResponse.java
         11/04/2012  04:39 PM               663 Java6WebService.class
         11/04/2012  04:38 PM               941 Java6WebService.java
         11/04/2012  04:39 PM             2,079 Java6WebServiceService.class
         11/04/2012  04:38 PM             2,512 Java6WebServiceService.java
         11/04/2012  04:39 PM             1,580 ObjectFactory.class
         11/04/2012  04:38 PM             2,376 ObjectFactory.java
         11/04/2012  04:39 PM               225 package-info.class
         11/04/2012  04:38 PM                84 package-info.java
         12 个文件         13,866 字节
         2 个目录 29,689,368,576 可用字节

         */
    }
}
